x86: Fix GRANT_PTE_FLAGS.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 3 Nov 2008 10:32:54 +0000 (10:32 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 3 Nov 2008 10:32:54 +0000 (10:32 +0000)
commit03dc0c1ae5dbc76d054844d6303c8b37d030adce
tree67ba6ba07d66cd7a920512666b94f88140718253
parent18a4292db0f4f65c61806a92ea4eef89418a6c1b
x86: Fix GRANT_PTE_FLAGS.

Since page table entries created through e.g. GNTTABOP_map_grant_ref
are being passed through adjust_guest_l1e(), they must not generally
get _PAGE_USER set - this will be taken care of by adjust_guest_l1e(),
and it will ensure that these don't get _PAGE_GLOBAL set
inadvertently.

Due to the implied security aspect here (_PAGE_GLOBAL getting set on
kernel pages for x86-64), I'd like to ask that this also be applied to
older maintained branches.

At the same time, set _PAGE_NX for pte-s created for grants (as long
as hardware supports it), since it should be only data pages that remote
domains are being given access to.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/include/asm-x86/page.h
xen/include/asm-x86/x86_32/page.h
xen/include/asm-x86/x86_64/page.h